#include <bits/stdc++.h>
using namespace std;

#define ONLINE_JUDGE

#ifndef ONLINE_JUDGE
#define dbg(x...)                             \
	{                                         \
		cerr << "\033[32;1m" << #x << " -> "; \
		err(x);                               \
	}
void err()
{
	cerr << "\033[39;0m" << endl;
}
template <typename T, typename... A>
void err(T a, A... x)
{
	cerr << a << ' ';
	err(x...);
}
#else
#define dbg(...)
#endif

typedef long long LL;

const int N = 1e3 + 50;

typedef pair<int, int> P;

P a[N];

set<P> S;
int n;

int id[N * 4][N * 4];

inline bool find(int x, int y)
{
	// dbg(x, y);
	if (abs(x) > 1000 + N || abs(y) > 1000 + N || x < 0 || y < 0) return false;
	return id[x][y] != 0;
}

bool check(P x)
{
	for (int i=0; i<n; ++i)
		if (!find(a[i].first + x.first,a[i].second + x.second) && !find(a[i].first - x.first,a[i].second - x.second))  
		{
			dbg(x.first, x.second, i, a[i].first, a[i].second);
			return false;
		}
	return true;
}

int main(int argc, char const *argv[])
{
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
	{
		scanf("%d%d", &a[i].first, &a[i].second);
		
		a[i].first += N;
		a[i].second += N;
		dbg(a[i].first, a[i].second);
		id[a[i].first][a[i].second] = i + 1;
	}
	int ans = 0;
	for (int i=1; i<n; ++i)
	{
		P x(a[i].first - a[0].first, a[i].second - a[0].second);
		// dbg(x.first, x.second);
		if (!S.count(x) && check(x))
		{
			++ans; S.insert(x);
		}
		x.first = -x.first;
		x.second = -x.second;
		if (!S.count(x) && check(x))
		{
			++ans; S.insert(x);
		}
	}

	printf("%d\n", ans);
	return 0;
}